using System;
using System.Xml.Serialization;

//NOTE: .NET namepaces/packages do not allow for number values ie www.rewerse.net.I1.2006.R2ML was changed to the name space below.
namespace R2ML
{
    //[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://www.rewerse.net/I1/2006/R2ML")]
    //[System.Xml.Serialization.XmlRootAttribute("ReactionRule",Namespace="http://www.rewerse.net/I1/2006/R2ML",IsNullable=false)]
    public class ReactionRule
    {
        public ReactionRule()
        {

        }

        private Documentation documentationField;
        private TriggeringEvent triggeringEventField;
        private String conditionsField;
        private ProducedAction producedActionField;
        private PostCondition postconditionField;

        private string ruleIDField;

        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute("Documentation")]
        public Documentation Documentation
        {
            get
            {
                return this.documentationField;
            }
            set
            {
                this.documentationField = value;
            }
        }

        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute("triggeringEvent", IsNullable = false)]
        public TriggeringEvent triggeringEvent
        {
            get
            {
                return this.triggeringEventField;
            }
            set
            {
                this.triggeringEventField = value;
            }
        }

        /// <remarks>
        /// There must be 1..* conditions.
        /// </remarks>
        [System.Xml.Serialization.XmlElementAttribute("conditions")]
        public String conditions
        {
            get
            {
                return this.conditionsField;
            }
            set
            {
                this.conditionsField = value;
            }
        }

        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute("producedAction", IsNullable = false)]
        public ProducedAction producedAction
        {
            get
            {
                return this.producedActionField;
            }
            set
            {
                this.producedActionField = value;
            }
        }

        /// <remarks/>
        [System.Xml.Serialization.XmlElementAttribute("postcondition", IsNullable = true)]
        public PostCondition postcondition
        {
            get
            {
                return this.postconditionField;
            }
            set
            {
                this.postconditionField = value;
            }
        }

        /// <remarks/>
        [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified)]
        public string ruleID
        {
            get
            {
                return this.ruleIDField;
            }
            set
            {
                this.ruleIDField = value;
            }
        }
    }
}
